package web.service.impls;

import java.util.List;

import map.beans.MapToolConfigBean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import web.dao.interfaces.MapToolConfigDao;
import web.service.interfaces.MapToolConfigServiceInterface;

@Repository("mapToolConfigService")
public class MapToolConfigServiceImpl implements MapToolConfigServiceInterface {	
	@Autowired
	MapToolConfigDao toolsDao;

	@Override
	public List<MapToolConfigBean> findAll() {
		return toolsDao.findAll();
	}

	@Override
	public Long save(MapToolConfigBean mapTool) {
		return toolsDao.save(mapTool);
	}

	@Override
	public Long update(MapToolConfigBean mapTool) {
		return toolsDao.update(mapTool);
	}

	@Override
	public boolean delete(MapToolConfigBean mapTool) {
		return toolsDao.delete(mapTool);
	}

	@Override
	public MapToolConfigBean getMapTool(Long id) {
		return toolsDao.getMapTool(id);
	}

	@Override
	public void update(List<MapToolConfigBean> mapTools) {
		for (MapToolConfigBean mapTool : mapTools) {
			toolsDao.update(mapTool);
		}
	}	
}
